<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<body>
	<p:growl id="growl" showDetail="true" sticky="true" />
	<h:form id="formLogin">
		<h1>
			<h:outputText value="Login" />
		</h1>

		<p:panel>

			<p:panelGrid id="grid" columns="3" cellpadding="5">
				<p:outputLabel for="username" value="Usuario : " />
				<p:inputText id="username" required="true"
					value="#{loginManagedBean.usuarioLogueado.username}" />
				<p:message for="username" display="usuario" />

				<p:outputLabel for="password" value="Password: " />
				<p:password id="password"
					value="#{loginManagedBean.usuarioLogueado.password}"
					required="true" />
				<p:message for="password" display="password" />

				<p:commandButton action="#{loginManagedBean.verificarSession()}"
					id="submitButton" value="Ingresar" update="grid :growl" />

			</p:panelGrid>

		</p:panel>

	</h:form>
	<h:form id="nuevoUser">
		<p:panel>
			<p:panelGrid>
				<p:commandButton action="agregar" id="agregarButton"
					value="Agregar Nuevo" />
			</p:panelGrid>
		</p:panel>
	</h:form>
</body>
</html>